<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>来自lifanko的烟火秀</title>
    <script src="../js/p5.min.js"></script>
    <script src="Firework.js"></script>
    <script src="app.js"></script>
    <style>
        body {
            margin: 0;
            background-color: black;
        }

        #box {
            z-index: -1;
            top: 0;
            bottom: 0;
        }

        p {
            color: aqua;
            transition: all 1.5s 0s;
            opacity: 0;
            text-align: center;
            font-size: 30px;
        }

    </style>
</head>
<body>
<div id="box" style="position: absolute"></div>
<p id="nnn"></p>
<script>
    function setCookie(cookieKey, cookieValue, expireDays) {
        var expDate = new Date();
        expDate.setDate(expDate.getDate() + expireDays);
        //noinspection JSDeprecatedSymbols
        document.cookie = cookieKey + "=" + escape(cookieValue) +
            ((expireDays == null) ? "" : "; expires=" + expDate.toGMTString());
    }

    function getCookie(cookieKey) {
        var arr, reg = new RegExp("(^| )" + cookieKey + "=([^;]*)(;|$)");
        //noinspection JSDeprecatedSymbols
        return (arr = document.cookie.match(reg)) ? unescape(arr[2]) : null;
    }

    setCookie('name', '郭江镇童鞋专属烟花秀!', 30);

    if (getCookie('name')) {
        var nnn = document.getElementById("nnn");
        nnn.innerText = getCookie('name');
        setTimeout(function () {
            nnn.style.opacity = '1';
        }, 100);
        setTimeout(function () {
            nnn.style.opacity = '0';
        }, 5000)
    }
</script>
</body>
</html>